Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tools: Topology2: Add DC block component #8145

Merged
merged 5 commits into from
Oct 13, 2023

Conversation

singalsu
Copy link
Collaborator

@singalsu singalsu commented Sep 4, 2023

Updated description - this is more a collection of patches to create in simple way topologies to test all processing components by e.g. loading and unloading the component & format specific topologies.

  • first patch adds dcblock widget class and example configuration blob
  • second patch adds build of minimalistic topology to test dccomp. The include files needed are generated by shell script bench_comp_generate.sh . They may need small hand edit for bytes control presence, add of other control like switch, or name or blob file name.
  • in same style test topologies are added for DRC, IIR, FIR in patches 3 - 5.

Example of topology to test s32 format dcblock:

sof-hda-benchmark-dcblock32-tgl

@singalsu
Copy link
Collaborator Author

singalsu commented Sep 4, 2023

@ranj063 @kv2019i @plbossart I wonder if this is a good way to create simple topologies to allow test run for any processing component that can fit the one sourcec one sink template? Can it be done more efficiently with tplg2 syntax? I'd like to run these same topologies in DUT, SOF ALSA plugin, and testbench environments.

Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singalsu I'm good with a bench tplg2 dir that can be invoked later by CI using test bench and plugin to test quality, perf on host.

@singalsu singalsu marked this pull request as ready for review September 28, 2023 07:15
Copy link
Member

@lgirdwood lgirdwood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@singalsu we can fix all the blobs with cmd line in another PR, but it should be obvious to any developer how to reproduce the blob (and hence modify it for their own reasons).

@@ -0,0 +1,12 @@
# Exported with script example_dcblock.m 27-Sep-2023
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but what about the cmd line args used to generate this and other blobs ? i.e. how would someone else reproduce this ?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That is all needed, there are no command line args.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Though I guess you meant how to launch the blobs generator from shell command line. I can add that as well.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be then cd tools/tune/dcblock; octave --no-window-system example_dcblock.m .

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The script PR #8283 includes this change. I'd like to propose for HDA generic analog capture replace IIR with smaller MCPS dcblock so I created a set of blobs to use for the purpose there.

exit 1
fi
comp=$1

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
FULL_CMD=( "$0" "$@" )

fn=${comp}_${format}.conf
echo Creating file "$fn"
cat > "$fn" <<EOF_COMP
# Created with script "$0 $comp"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Created with script "$0 $comp"
# Created with script ${FULL_CMD[@]}

This addresses @lgirdwood 's concern.

It does not "re-quote" whitespace but good enough for now.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, yes that's better, though it's not same as what Liam asked.

This patch adds the widget class dcblock and a sample
bytes configuration blobs.

Signed-off-by: Seppo Ingalsuo <[email protected]>
This patch uses cavs-benchmark-hda.conf to build topologies to
test components in a simple playback and capture configuration.

host copier --> component --> DAI copier
host copier <-- component <-- DAI copier

The built topologies are
sof-hda-benchmark-dcblock16/24/32-tgl.tplg

The shell script bench_comp_generate.sh is added to conveniently
generate include files needed to build new test topologies for
component with s16/s24/s32 format.

Signed-off-by: Seppo Ingalsuo <[email protected]>
This patch adds DRC test topologies build.

Signed-off-by: Seppo Ingalsuo <[email protected]>
This patch adds IIR EQ topologies build.

Signed-off-by: Seppo Ingalsuo <[email protected]>
This patch adds FIR EQ topologies build.

Signed-off-by: Seppo Ingalsuo <[email protected]>
echo "Usage: $0 <component>"
exit 1
fi
comp=$1
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit

Suggested change
comp=$1
COMP=$1

@kv2019i
Copy link
Collaborator

kv2019i commented Oct 10, 2023

@ranj063 Good to go?

@kv2019i kv2019i merged commit df8f9df into thesofproject:main Oct 13, 2023
35 of 38 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants